<div class="module groups">					
	<h3 class="gradient dark">
		<?php echo link_to('Create a Group', 'groups/edit') ?> 
		<?php echo $sf_user->isCurrentUser($user->getId()) ? 'Your' : render_display_name($user)."'s "?> Groups
	</h3>
	<div class="inner">
		<?php if($group_members): ?>
			<ul>
				<?php foreach($group_members as $member): ?>
				<li>
					<h4>
						<?php echo link_to($member->getGroup()->getName(), 'groups/show?id='. $member->getGroup()->getId()) ?>
					</h4>
					<p class="activity"><span class="stars three">3 stars</span>
					<?php echo $member->getGroup()->countGroupMembers() ?> members</p>
					<p><?php echo $member->getGroup()->getDescription() ?></p>
				</li>
				<?php endforeach ?>
			</ul>
		<?php else: ?>
			<div class="empty">
				<img src="/images/img_sample_groups-sidebar.jpg" alt="Sample view">
				<p>
					<?php echo $sf_user->isCurrentUser($user->getId()) ? 'You are' : render_display_name($user). " is" ?> not part of any groups
				</p>
			</div>
		<?php endif ?>
	</div>
</div>